<template>
	<view class="main">
		<view class="userInfo" v-if="!token || !phone">
			<image src="https://t1.chowtaiking.com.cn/img/ruoyi/2023/12/19/d8dbd22f56b24f6c9300dd922134558c.jpg" mode="widthFix" @click="onLigon()"></image>
			<view class="userInfo-info">
				<view class="wrz" @click="authentication()">未认证</view>
				<view class="phone">林小姐</view>
				<view class="phone wrz" @click="goSet()">/ 修改个人信息 ></view>
			</view>
		</view>
		<view class="userInfo" v-else>
			<image :src="avatarUrl" mode="widthFix"></image>
			<view class="userInfo-info">
				<view class="wrz" @click="authentication()">未认证</view>
				<view class="phone">{{phone}}</view>
				<view class="phone wrz" @click="goSet()">/ 修改个人信息 ></view>
			</view>
		</view>
		<view class="sm_logo">
			<image src="https://t1.chowtaiking.com.cn/img/ruoyi/2023/12/19/683d30d1e8d7445ab1c6ecb6b82b142c.png" mode="widthFix" @click="goScan()"></image>
			<view class="sm_logo_name">业务经理</view>
		</view>
	</view>
</template>

<script>
	export default{
		props:["avatarUrl","nickName","token","phone"],
		data(){
			return{
				
			}
		},
		methods:{
			// 跳到企业认证页面
			authentication(){
				// uni.navigateTo({
				// 	url:"/pages/authentication/authentication"
				// })
				uni.navigateTo({
					url:"/pages/apply/apply"
				})
			},
			// 跳到联系导购页面
			goScan(){
				// uni.navigateTo({
				// 	url:"/pages/user_scanCode/scan-code"
				// })
				uni.navigateTo({
					url:"/pages/user_card/user_card"
				})
			},
			// 跳到修改个人信息页面
			goSet(){
				uni.navigateTo({
					url:"/pages/user_setInfo/setInfo"
				})
			},
			// 登录
			onLigon(){
				uni.navigateTo({
					url:"/pages/login/login"
				})
			}
		},
		onLoad() {
			console.log(this.token,this.nickName,this.avatarUrl);
		}
	}
</script>

<style>
	.main{
		display: flex;
		align-items: center;
		justify-content: space-around;
		background-color: #f7dcad;
	}
	.userInfo{
		width: 100%;
		display: flex;
		padding-left: 30px;
		padding-top: 20px;
	}
	.userInfo image{
		width: 40px;
		height: 40px;
		border-radius: 50%;
	}
	.userInfo-info{
		margin-left: 10px;
		padding-bottom: 20px;
	}
	.wrz{
		font-size: 12px;
	}
	.phone{
		color: #b7a68c;
	}
	.sm_logo image{
		padding-right: 20px;
		width: 25px;
	}
	.sm_logo_name{
		font-size: 8px;
	}
</style>